home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Intervals
/
i-direction
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-24
|
487b
|
16 lines
i-direction direction integer
u = up
d = down
(i-direction '(u d u d u d u d u d u)
'(1 2 3 4 5 6 7 8 9 10 11))
=> (1 -2 3 -4 5 -6 7 -8 9 -10 11)
(setq interval
(i-direction '((u d u d u d u d u d u) (d u d u d u d u d u d ))
'((1 2 3 4 5 6 7 8 9 10 11) (1 2 3 4 5 6 7 8 9 10 11))))
=> ((1 -2 3 -4 5 -6 7 -8 9 -10 11) (-1 2 -3 4 -5 6 -7 8 -9 10 -11))
(i-process 'a 'piano interval)
=> ((a b -b c -c d -d e -e f -f g) (f h e i d j c k b l a))